<?php
namespace api\test\model;

use think\Model;

Class MajorModel extends Model
{
    protected $name = 'major' ;
    public function classroom ()
    {
        return $this->hasMany('ClassModel','major_id','id');
    }
}